/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Helper;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Lu Xiaodi
 */
public class Helper_Stakeholder_Food implements Serializable{
    private String name;
    private List<Helper_Outlet> outlet = new ArrayList<Helper_Outlet>();
    
    public Helper_Stakeholder_Food(){
        
    }
    
    public Helper_Stakeholder_Food(String name){
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Helper_Outlet> getOutlet() {
        return outlet;
    }

    public void setOutlet(List<Helper_Outlet> outlet) {
        this.outlet = outlet;
    }
    
    public void addOutlet (Helper_Outlet outlet){
        for (Helper_Outlet o: this.outlet){
            if (o.getId().longValue()==outlet.getId().longValue())
                return;
        }
        this.outlet.add(outlet);
    }

    @Override
    public String toString() {
        return this.name;
    }
    
    
}
